Computer architectures and operating systems have evolved, in parallel, over the past 40 years to provide large virtual-memory address spaces to processes executing on computer systems. The operating system provides to a process, executing within an execution environment provided by the operating system, a large virtual-memory address space by swapping pages between a generally smaller physical memory and mass-storage devices and by mapping virtual-memory addresses to physical-memory addresses.
FIG. 1 illustrates virtual memory provided by a combined operating-system/hardware system. In FIG. 1, the operating system is abstractly represented as a circle 102 enclosing hardware components including a processor 104, physical memory 106, and mass-storage devices 108. FIG. 1 is intended to abstractly represent certain features of the hardware system, or machine, rather than to accurately represent a machine or enumerate the components of a machine. In general, the operating system provides, to each process executing within the execution environment provided by the operating system, a large virtual-memory address space, represented in FIG. 1 by vertical columns external to the operating system, such as vertical column 110. The virtual-memory address space defines a sequence of addressable memory bytes with addresses ranging from 0 to 264−1 for a combined operating-system/hardware system supporting 64-bit addresses. Depending on the machine and operating system, certain portions of the virtual-memory address space may be inaccessible to a process, and various mechanisms may be used to extend the size of the virtual-memory address space beyond the maximum size addressable by the machine-supported addressing unit. An operating system generally provides a separate virtual-memory address space to each process concurrently executing on top of the operating system, so that, as shown in FIG. 1, the operating system may simultaneously support a number of distinct and separate virtual-memory address spaces 110-114.
A virtual-memory address space is, in many respects, an illusion created and maintained by the operating system. A process or thread executing on the processor 104 can generally access only a portion of physical memory 106. Physical memory may constitute various levels of caching and discrete memory components distributed between the processor and separate memory integrated circuits. The physical memory addressable by an executing process is often smaller than the virtual-memory address space provided to a process by the operating system, and is almost always smaller than the aggregate size of the virtual-memory address spaces simultaneously provided by the operating system to concurrently executing processes. The operating system creates and maintains the illusion of relatively vast virtual-memory address spaces by storing the data, addressed via a virtual-memory address space, on mass-storage devices 108 and rapidly swapping portions of the data, referred to as pages, into and out from physical memory 106 as demanded by virtual-memory accesses made by executing processes. In general, the patterns of access to virtual memory by executing programs are highly localized, so that, at any given instant in time, a program may be reading to, and writing from, only a relatively small number of virtual-memory pages. Thus, only a comparatively small fraction of virtual-memory accesses require swapping of a page from mass-storage devices 108 to physical memory 106.
Generally, an operating system makes use of special registers, instructions, and firmware services provided by and for modern processors in order to efficiently implement virtual memory. Initially, these specialized registers, instructions, and machine-level routines were designed to support a single operating system. However, designers and manufacturers of computer systems currently seek to allow multiple operating systems to concurrently run on a given computer system. Thus, computer-system designers and manufacturers have recognized the need for methods and techniques for efficiently providing virtual memory services to multiple, concurrently executing operating systems to allow the multiple, concurrently executing operating systems to provide multiple virtual-memory address spaces to processes executing within the execution environments provided by the multiple, concurrently executing operating systems.